package com.link2room.ironhide.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by sss on 2016/10/11.
 */
@Entity
@Table(name = "l2r_group_area")
@DynamicInsert
public class L2RGroupArea extends BaseEntity{
    public enum L2RGroupArea_{
        countryCode,countryName,countrySearchCode,provinceCode,provinceName,provinceSearchCode,cityCode,cityName,citySearchCode,district,districtName,districtSearchCode,isHot
    }
    /**
     * 国家代码
     */
    private String countryCode;
    /**
     * 国家名称
     */
    private String countryName;
    /**
     * 国家检索代码
     */
    private String countrySearchCode;
    /**
     * 省份代码
     */
    private Long provinceCode;
    /**
     * 省份名称
     */
    private String provinceName;
    /**
     * 省份检索代码
     */
    private String provinceSearchCode;
    /**
     * 城市代码
     */
    private Long cityCode;
    /**
     * 城市名称
     */
    private String cityName;
    /**
     * 城市检索代码
     */
    private String citySearchCode;
    /**
     * 是否热门城市
     */
    private String isHot;
    /**
     * 酒店数量
     */
    private Integer hotelNum;
    /**
     * 国家英文名称
     */
    private String countryNameEn;

    @Basic
    @Column(name = "country_code", nullable = true, length = 16)
    public String getCountryCode() {
        return countryCode;
    }

    public void setCountryCode(String countryCode) {
        this.countryCode = countryCode;
    }

    @Basic
    @Column(name = "country_name", nullable = true, length = 16)
    public String getCountryName() {
        return countryName;
    }

    public void setCountryName(String countryName) {
        this.countryName = countryName;
    }

    @Basic
    @Column(name = "province_code", nullable = true, length = 16)
    public Long getProvinceCode() {
        return provinceCode;
    }

    public void setProvinceCode(Long provinceCode) {
        this.provinceCode = provinceCode;
    }

    @Basic
    @Column(name = "province_name", nullable = true, length = 16)
    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    @Basic
    @Column(name = "city_code", nullable = true, length = 16)
    public Long getCityCode() {
        return cityCode;
    }

    public void setCityCode(Long cityCode) {
        this.cityCode = cityCode;
    }

    @Basic
    @Column(name = "city_name", nullable = true, length = 16)
    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    @Basic
    @Column(name = "city_search_code", nullable = true, length = 64)
    public String getCitySearchCode() {
        return citySearchCode;
    }

    public void setCitySearchCode(String citySearchCode) {
        this.citySearchCode = citySearchCode;
    }

    @Basic
    @Column(name = "country_name_en", nullable = true, length = 32)
    public String getCountryNameEn() {
        return countryNameEn;
    }

    public void setCountryNameEn(String countryNameEn) {
        this.countryNameEn = countryNameEn;
    }

    @Basic
    @Column(name = "country_search_code", nullable = true, length = 64)
    public String getCountrySearchCode() {
        return countrySearchCode;
    }

    public void setCountrySearchCode(String countrySearchCode) {
        this.countrySearchCode = countrySearchCode;
    }

    @Basic
    @Column(name = "province_search_code", nullable = true, length = 64)
    public String getProvinceSearchCode() {
        return provinceSearchCode;
    }

    public void setProvinceSearchCode(String provinceSearchCode) {
        this.provinceSearchCode = provinceSearchCode;
    }

    @Basic
    @Column(name = "is_hot", nullable = true, length = 2)
    public String getIsHot() {
        return isHot;
    }

    public void setIsHot(String isHot) {
        this.isHot = isHot;
    }

    @Basic
    @Column(name = "hotel_num", nullable = true, length = 11)
    public Integer getHotelNum() {
        return hotelNum;
    }

    public void setHotelNum(Integer hotelNum) {
        this.hotelNum = hotelNum;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        L2RGroupArea that = (L2RGroupArea) o;

        if (countryCode != null ? !countryCode.equals(that.countryCode) : that.countryCode != null) return false;
        if (countryName != null ? !countryName.equals(that.countryName) : that.countryName != null) return false;
        if (countrySearchCode != null ? !countrySearchCode.equals(that.countrySearchCode) : that.countrySearchCode != null) return false;
        if (provinceCode != null ? !provinceCode.equals(that.provinceCode) : that.provinceCode != null) return false;
        if (provinceName != null ? !provinceName.equals(that.provinceName) : that.provinceName != null) return false;
        if (provinceSearchCode != null ? !provinceSearchCode.equals(that.provinceSearchCode) : that.provinceSearchCode != null) return false;
        if (cityCode != null ? !cityCode.equals(that.cityCode) : that.cityCode != null) return false;
        if (cityName != null ? !cityName.equals(that.cityName) : that.cityName != null) return false;
        if (citySearchCode != null ? !citySearchCode.equals(that.citySearchCode) : that.citySearchCode != null)
            return false;
        if (isHot != null ? !isHot.equals(that.isHot) : that.isHot != null) return false;
        if (hotelNum != null ? !hotelNum.equals(that.hotelNum) : that.hotelNum != null) return false;
        if (countryNameEn != null ? !countryNameEn.equals(that.countryNameEn) : that.countryNameEn != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = countryCode != null ? countryCode.hashCode() : 0;
        result = 31 * result + (countryName != null ? countryName.hashCode() : 0);
        result = 31 * result + (countryNameEn != null ? countryNameEn.hashCode() : 0);
        result = 31 * result + (countrySearchCode != null ? countrySearchCode.hashCode() : 0);
        result = 31 * result + (provinceCode != null ? provinceCode.hashCode() : 0);
        result = 31 * result + (provinceName != null ? provinceName.hashCode() : 0);
        result = 31 * result + (provinceSearchCode != null ? provinceSearchCode.hashCode() : 0);
        result = 31 * result + (cityCode != null ? cityCode.hashCode() : 0);
        result = 31 * result + (cityName != null ? cityName.hashCode() : 0);
        result = 31 * result + (citySearchCode != null ? citySearchCode.hashCode() : 0);
        result = 31 * result + (isHot != null ? isHot.hashCode() : 0);
        result = 31 * result + (hotelNum != null ? hotelNum.hashCode() : 0);
        return result;
    }

}
